<!DOCTYPE html>
<html>
<head lang="zh-CN">
    <meta charset="UTF-8">
    <title>分享到微信</title>
    <script src="../js/jquery-1.6.2.min.js"></script>
    <script src="../js/qr.min.js"></script>
    <script type="text/javascript">
        function getUrlParam(name) {
            var reg = new RegExp("(^|&)"+ name +"=([^&]*)(&|$)");
            var r = window.location.search.substr(1).match(reg);
            if (r!=null) {
                return unescape(r[2]);
            }
            return null;
        }
        $(document).ready(function() {
            var url = getUrlParam('url');
            qr.canvas({
                canvas: document.getElementById('qr-code'),
                value: url
            });
        });
    </script>
</head>
<body>
    <div style="text-align:center">
        <canvas id="qr-code"></canvas><br/>
        扫描上面的二维码分享到微信
        <div >
            <p>如何用微信拍二维码: <a href="http://baike.baidu.com/view/7443374.htm" target="_blank">查看详情</a></p>
            <img src="../img/weixin_share/wx_explain.png">
        </div>
    </div>
</body>
</html>